#!/bin/awk -f

BEGIN {
    FS="#"
    # 手工建立数组
    belt["Yellow"]
    belt["Orange"]
    belt["Red"]

    stu["Junior"]
    stu["Senior"]

}

{
    for (color in belt)
    {
        if ($1==color) belt[color]++
    }
}

{
    for (senior_or_junior in stu)
    {
        if ($2==senior_or_junior) stu[senior_or_junior]++
    }
}

END {
    for (c in belt) print "The club has", belt[c], c, "belts"

    for (senior_or_junior in stu) print "The club has", stu[senior_or_junior],senior_or_junior, "students"
}